<!-- 查看参数 -->
<template>
    <div class="">
        <el-table
            :data="tableData"
            class="mbtm20"
            fit
            highlight-current-row
            style="width: 100%;"
            border
        >
            <el-table-column v-for="(item, index) in tableLabel" :key = index :width="item.width" :label="item.label" align="center" >
                <template slot-scope="scope">
                    <span>{{ scope.row[item.prop] }}</span>
                </template>
            </el-table-column>
            <el-table-column fixed="right" header-align="center" align="center" width="150" label="操作">
                <template slot-scope="scope">
                    <el-button type="text" size="small" @click="addOrUpdateHandle(scope.row.id, scope.row)">修改</el-button>
                    <el-button type="text" size="small" @click="deleteHandle(scope.row.id)">删除</el-button>
                </template>
        </el-table-column>
        </el-table>
        <pagination v-show="config.total>0" :total="config.total" :page.sync="config.pageNum" :limit.sync="config.pageSize" @pagination="changePage" />

    </div>
</template>

<script>
import Pagination from "@/components/Pagination";

export default {
  name: 'TableView',
  props: {
    tableLabel: Array,
    tableData: Array,
    config: Object,
    
  },
  components: {
      Pagination,
  },
  data() {
    return { 

    }
  },
  watch: {
      // 当replaceObj发生变化时，执行
      
  },
  mounted() {
  },
  methods: {
    changePage(page) {
        this.$emit('changePage', page)
    }
  }
}
</script>

<style>

</style>
